<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Support\Facades\Auth;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    protected $errors;

    //警卫
    protected function adminAuth()
    {
        return Auth::guard('admin');
    }

    //登陆的管理员信息
//    protected function admin()
//    {
//        return Auth::guard('admin')->user();
//    }

    protected function success($msg){
        return response()->json(['code'=>0,'msg'=>$msg]);
    }

    protected function error($msg){
        return response()->json(['code'=>1,'msg'=>$msg]);
    }


}
